home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 4.4 KB | 152 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Proxy.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PROXY_H
- #define PROXY_H
-
- #ifndef PART_H
- #include "Part.h"
- #endif
-
- #ifndef CELL_H
- #include "Cell.h"
- #endif
-
- // ----- ODF Includes -----
-
- #ifndef FWPROXY_H
- #include "FWProxy.h"
- #endif
-
- // ----- Foundation Layer -----
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWTCOLL_H
- #include "FWTColl.h"
- #endif
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- class CTablePart;
- class CTablePartContent;
-
- //========================================================================================
- // class CTableProxy
- //========================================================================================
-
- class CTableProxy : public FW_MProxy
- {
- public:
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CTableProxy(Environment* ev, CTablePart* tablePart, CTablePartContent* content);
- virtual ~ CTableProxy();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- virtual void UsedShapeChanged(Environment *ev,
- FW_CEmbeddingFrame* embeddingFrame,
- ODFrame* odEmbeddedFrame);
-
- virtual ODShape* FrameShapeRequested(Environment* ev,
- FW_CEmbeddingFrame* embeddingFrame,
- ODFrame* odEmbeddedFrame,
- ODShape* askedFrameShape);
-
- virtual short CreateFacets(Environment* ev,
- FW_CEmbeddingFrame* embeddingFrame,
- ODFacet* embeddingFacet,
- ODFrame* embeddedFrame,
- ODShape* proposedClipShape);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void MoveEmbeddedFrames(Environment* ev, const CCell& destCell);
- ODShape* AcquireHiliteShape(Environment* ev, const CCell& cell, FW_CEmbeddingFrame* frame);
-
- // ----- Getters/Setters -----
- const CCell& GetCell() const;
- void SetCell(const CCell& cell);
-
- ODUpdateID GetLinkSpecID()
- { return fLinkSpecID; }
- void SetLinkSpecID(ODUpdateID id)
- { fLinkSpecID = id; }
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CTablePart* fTablePart;
- CTablePartContent* fTableContent;
- CCell fCell;
- ODUpdateID fLinkSpecID; // id of link spec written to clipboard
- };
-
- //========================================================================================
- // class CTableProxyCollection
- //========================================================================================
-
- class CTableProxyCollection : public FW_TOrderedCollection<CTableProxy>
- {
- public:
- FW_DECLARE_AUTO(CTableProxyCollection)
-
- CTableProxyCollection() :
- FW_TOrderedCollection<CTableProxy>(){}
- ~CTableProxyCollection() {}
- };
-
- //========================================================================================
- // class CTableProxyCollectionIterator
- //========================================================================================
-
- class CTableProxyCollectionIterator : public FW_TOrderedCollectionIterator<CTableProxy>
- {
- public:
- FW_DECLARE_AUTO(CTableProxyCollectionIterator)
-
- CTableProxyCollectionIterator(CTableProxyCollection* collection) :
- FW_TOrderedCollectionIterator<CTableProxy>(collection){}
- ~CTableProxyCollectionIterator() {}
- };
-
- //========================================================================================
- // CTableProxy Inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // CTableProxy::GetCell
- //----------------------------------------------------------------------------------------
- inline const CCell& CTableProxy::GetCell() const
- {
- return fCell;
- }
-
- //----------------------------------------------------------------------------------------
- // CTableProxy::SetCell
- //----------------------------------------------------------------------------------------
- inline void CTableProxy::SetCell(const CCell& cell)
- {
- fCell = cell;
- }
-
- #endif
-